import 'package:dmz/base/widget/defult_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class SetMotoInforWidgets {
  static backWidget(child) {
    return Container(
        decoration: const BoxDecoration(
            gradient: LinearGradient(
          begin: Alignment.topCenter, // 渐变起始位置
          end: Alignment.bottomCenter, // 渐变结束位置
          colors: [
            Color(0xFF000000),
            Color(0xFF050505),
            Color(0xFF2C2D35)
          ], // 渐变色数组
        )),
        child: child);
  }

  static Widget listWidgets(List<String> titles) {
    item(String title) {
      return Container(
          height: 154.sp,
          child:
              Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
            DefaultText(title, 40.sp,
                textColor: Color(0xFFF9F9F9), fontWeight: FontWeight.w700),
            DefaultText(title, 32.sp, textColor: Color(0xFFF9F9F9)),
          ]));
    }

    return Column(
        mainAxisSize: MainAxisSize.min,
        children: List.generate(6, (index) => item(titles[index])));
  }
}
